﻿using iBuproModel.Repositories.Classes;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using iBuproModel;

namespace IBuproModel.Tests
{
    
    
    /// <summary>
    ///This is a test class for DiplomProjectStateRepositoryTest and is intended
    ///to contain all DiplomProjectStateRepositoryTest Unit Tests
    ///</summary>
    [TestClass()]
    public class DiplomProjectStateRepositoryTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for SetSubscribedState
        ///</summary>
        [TestMethod()]
        public void SetSubscribedStateTest()
        {
            DiplomProjectStateRepository target = new DiplomProjectStateRepository(); 
            DiplomProject project = new DiplomProject(); 
            target.SetSubscribedState(project);
            Assert.AreEqual(project.DiplomProjectState.Id, 4);
        }

        /// <summary>
        ///A test for SetNewProjectState
        ///</summary>
        [TestMethod()]
        public void SetNewProjectStateTest()
        {
            DiplomProjectStateRepository target = new DiplomProjectStateRepository(); 
            DiplomProject project = new DiplomProject(); 
            target.SetNewProjectState(project);
            Assert.AreEqual(project.DiplomProjectState.Id, 1);
        }

        /// <summary>
        ///A test for SetLectorAcceptedState
        ///</summary>
        [TestMethod()]
        public void SetLectorAcceptedStateTest()
        {
            DiplomProjectStateRepository target = new DiplomProjectStateRepository(); 
            DiplomProject project = new DiplomProject(); 
            target.SetLectorAcceptedState(project);
            Assert.AreEqual(project.DiplomProjectState.Id, 3);
        }

        /// <summary>
        ///A test for SetDefendedState
        ///</summary>
        [TestMethod()]
        public void SetDefendedStateTest()
        {
            DiplomProjectStateRepository target = new DiplomProjectStateRepository(); 
            DiplomProject project = new DiplomProject(); 
            target.SetDefendedState(project);
            Assert.AreEqual(project.DiplomProjectState.Id, 6);
        }

        /// <summary>
        ///A test for SetCanceledState
        ///</summary>
        [TestMethod()]
        public void SetCanceledStateTest()
        {
            DiplomProjectStateRepository target = new DiplomProjectStateRepository(); 
            DiplomProject project = new DiplomProject(); 
            target.SetCanceledState(project);
            Assert.AreEqual(project.DiplomProjectState.Id, 5);
        }

        /// <summary>
        ///A test for SeBookedProjectState
        ///</summary>
        [TestMethod()]
        public void SeBookedProjectStateTest()
        {
            DiplomProjectStateRepository target = new DiplomProjectStateRepository(); 
            DiplomProject project = new DiplomProject(); 
            target.SetBookedProjectState(project);
            Assert.AreEqual(project.DiplomProjectState.Id, 2);
        }

        /// <summary>
        ///A test for DiplomProjectStateRepository Constructor
        ///</summary>
        [TestMethod()]
        public void DiplomProjectStateRepositoryConstructorTest()
        {
            DiplomProjectStateRepository target = new DiplomProjectStateRepository();
            Assert.IsNotNull(target);
        }
    }
}
